function [perct,act_cells]=get_active_cell_perct(proj_meta,cur_site)
threshold=10;
act_cells={};
for tnd=1:length(proj_meta(cur_site).ExpGroup)
    cell_mat=[];
    cnt=1;
    for gnd=1:proj_meta(cur_site).nbr_piezo_layers
        for fnd=1:size(proj_meta(cur_site).rd(gnd,tnd).act,1)
            cell_mat(cnt,:)=proj_meta(cur_site).rd(gnd,tnd).act(fnd,:);
            cnt=cnt+1;
        end
    end
    lengths(tnd)=size(cell_mat,1);
    act_thresh=1+4*std(std(cell_mat,0,2));
    cell_num=1;
    cnt=1;
    for hnd=1:size(cell_mat,1)
        cur_act=cell_mat(hnd,:);
        cur_ons=find(cur_act>act_thresh);
        if sum(diff(cur_ons)>100)>threshold
            act_cells{tnd}(cnt)=cell_num;
            cnt=cnt+1;
        end
        cell_num=cell_num+1;
    end
end

perct=[];
for tnd=1:length(proj_meta(cur_site).ExpGroup)
    perct(tnd)=round((size(act_cells{tnd},2)/lengths(tnd))*100);
end